home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re Compile Problems.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  5.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Compile Problems
  2. Sent:        5/24/96 9:40 PM
  3. Received:    5/28/96 8:25 AM
  4. From:        Arni McKinley, motion@nbn.com
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. Hi Brad,
  9.  
  10. You might want to look at CScrollEdit in the source files for the ODF
  11. example "Form" written by Laurent. It may help a bit. It's a subclass of
  12. FW_CEditView and adds scrolling, but not styled text. It should give you
  13. some clues on your problems with the notification.
  14.  
  15. Arni
  16.  
  17.  
  18. >Hi,
  19. >
  20. >Here's what I'm trying to do. Basically, using FW_CEditText as a model
  21. >(but not a superclass), I'm trying to write a general scrolling,
  22. >styled text view in one class. It needs to be both a notifier and a
  23. >receiver.
  24. >
  25. >I copied the following out of the CW Message Box.
  26. >
  27. >
  28. >Error   : illegal use of abstract class
  29. >('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)')
  30. >
  31. >StyleEditView.cpp line 894   FW_CPrivWatcher(FW_PrivGetDeleteProc((const
  32. >CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() )
  33. >
  34. >
  35. >The code the compiler chokes on looks like:
  36. >
  37. >//------------------------------------------------------------------------
  38. >//      CStyleEditView::Create
  39. >//------------------------------------------------------------------------
  40. >
  41. >void* CStyleEditView::Create(   FW_CReadableStream&             stream,
  42. >                                                FW_ClassTypeConstant
  43. >type    )
  44. >{
  45. >        FW_UNUSED(stream);
  46. >        FW_UNUSED(type);
  47. >
  48. >        FW_SOMEnvironment ev;
  49. >        return FW_NEW(CStyleEditView, (ev));            // here's where it
  50. >chokes
  51. >}
  52. >
  53. >The start of my class definition looks like:
  54. >
  55. >class CStyleEditView :  public FW_CView,
  56. >                                        public FW_MReceiver,
  57. >                                        public FW_MNotifier
  58. >{
  59. >        public:
  60. >                FW_DECLARE_CLASS
  61. >                FW_DECLARE_AUTO(CStyleEditView)
  62. >
  63. >
  64. >and I have the following macros at the top of my .cpp file:
  65. >
  66. >FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver,
  67. >FW_MNotifier)
  68. >FW_DEFINE_AUTO(CStyleEditView)
  69. >
  70. >const FW_ClassTypeConstant LStyleEditView =
  71. >FW_TYPE_CONSTANT('S','t','E','V');
  72. >FW_REGISTER_ARCHIVABLE_CLASS(   LStyleEditView,
  73. >                                                CStyleEditView,
  74. >                                                CStyleEditView::Create,
  75. >                                                FW_CView::Read,
  76. >                                                CStyleEditView::Destroy,
  77. >                                                FW_CView::Write )
  78. >
  79. >
  80. >Any ideas? I've found it a little difficult to parse through all the
  81. >macros. I'm probably overlooking something very silly ;-).
  82. >
  83. >Thanks,
  84. >
  85. >Brad
  86. >
  87. >
  88. >
  89. >
  90. >Richard B. "Brad" Hutchings
  91. >General Partner,
  92. >Hutchings Software Development
  93. >
  94. >hsd@earthlink.net
  95. >
  96. >
  97. >Hi,
  98. >
  99. >Here's what I'm trying to do. Basically, using FW_CEditText as a model
  100. >(but not a superclass), I'm trying to write a general scrolling, styled
  101. >text view in one class. It needs to be both a notifier and a receiver.
  102. >
  103. >I copied the following out of the CW Message Box.
  104. >
  105. >
  106. >Error   : illegal use of abstract class
  107. >('FW_MReceiver::HandleNotification(Environment*,constFW_CNotification&)')
  108. >
  109. >StyleEditView.cpp line 894   FW_CPrivWatcher(FW_PrivGetDeleteProc((const
  110. >CStyleEditView*)0))) CStyleEditView(ev), FW_PrivWatcher_Pop() )
  111. >
  112. >
  113. >The code the compiler chokes on looks like:
  114. >
  115. >//------------------------------------------------------------------------
  116. >//      CStyleEditView::Create
  117. >//------------------------------------------------------------------------
  118. >
  119. >void* CStyleEditView::Create(   FW_CReadableStream&             stream,
  120. >                                                FW_ClassTypeConstant
  121. >type    )
  122. >{
  123. >        FW_UNUSED(stream);
  124. >        FW_UNUSED(type);
  125. >
  126. >        FW_SOMEnvironment ev;
  127. >        return FW_NEW(CStyleEditView, (ev));            // here's where it
  128. >chokes
  129. >}
  130. >
  131. >The start of my class definition looks like:
  132. >
  133. >class CStyleEditView :     public FW_CView,
  134. >                                        public FW_MReceiver,
  135. >                                        public FW_MNotifier
  136. >{
  137. >        public:
  138. >                FW_DECLARE_CLASS
  139. >                FW_DECLARE_AUTO(CStyleEditView)
  140. >
  141. >
  142. >and I have the following macros at the top of my .cpp file:
  143. >
  144. >FW_DEFINE_CLASS_M3(CStyleEditView, FW_CView, FW_MReceiver, FW_MNotifier)
  145. >FW_DEFINE_AUTO(CStyleEditView)
  146. >
  147. >const FW_ClassTypeConstant LStyleEditView = FW_TYPE_CONSTANT('S','t','E','V');
  148. >FW_REGISTER_ARCHIVABLE_CLASS(   LStyleEditView,
  149. >                                                CStyleEditView,
  150. >                                                CStyleEditView::Create,
  151. >                                                FW_CView::Read,
  152. >                                                CStyleEditView::Destroy,
  153. >                                                FW_CView::Write )
  154. >
  155. >
  156. >Any ideas? I've found it a little difficult to parse through all the
  157. >macros. I'm probably overlooking something very silly ;-).
  158. >
  159. >Thanks,
  160. >
  161. >Brad
  162. >
  163. >
  164. >
  165. >
  166. >Richard B. "Brad" Hutchings
  167. >General Partner,
  168. >Hutchings Software Development
  169. >
  170. >hsd@earthlink.net
  171.  
  172.